@import '../variables.less';
@import 'mixins.less';
@import '../includes/wiki-common.less';

.document {
  article {
    font-size: 14px;
    padding: 10px 16px;
  }

  .filter-bar {
    background: @mobileSubheaderBackground;
    color: #0A84FF;
    font-size: 14px;
    border-bottom: 1px solid #CFCFD0;

    .return-link {
      color: #0A84FF;
      display: block;
      line-height: 40px;
      padding: 10px 16px 10px 40px;
      position: relative;

      &:before {
        content: '\f053'; // chevron-left
        font-family: FontAwesome;
        font-size: 16px;
        height: 20px;
        left: 20px;
        position: absolute;
        width: 20px;
      }
    }
  }

  .title-bar {
    background: @mobileSubheaderBackground;
    color: #fff;
    padding: 10px 16px;

    h1 {
      font-size: 18px;
      font-weight: normal;
      margin: 0;
    }
  }

  .vote-bar,
  #related-documents {
    border-top: 1px solid @mobileInputBorder;
    font-size: 16px;
    margin: 10px 0;
    padding: 16px 0;

    header {
      margin-bottom: 6px;
    }
  }

  #related-documents {
    > ul {
      list-style: none;
      margin: 0;
      padding: 0;

      > li {
        margin-bottom: 10px;
        padding: 6px 0;

        &:last-child {
          margin-bottom: 0;
        }
      }
    }
  }

  .vote-bar {
    form {
      &.voted {
        display: none;
      }
    }

    .helpful {
      .btn {
        float: left;
        margin: 0 1%;
        width: 48%;
      }
    }

    .wait {
      display: none;
    }

    #unhelpful-survey {
      textarea {
        box-sizing: border-box;
        width: 100%;
      }

      ul {
        color: @mobileInputBorder;
        list-style: none;
        margin: 0 0 10px 0;
        padding: 0;

        > li {
          border: 1px solid @mobileInputBorder;
          border-bottom-width: 0;

          &:first-of-type {
            border-radius: 6px 6px 0 0;
          }

          &:last-of-type {
            border-bottom-width: 1px;
            border-radius: 0 0 6px 6px;
          }

          label {
            cursor: pointer;
            display: block;
            padding: 10px;

            input {
              display: none;
            }
          }

          &.checked {
            color: #000;

            label {
              &:after {
                content: '\2713';
                float: right;
              }
            }
          }
        }
      }

      .character-counter {
        color: @textLightGrey;
        font-size: 12px;
        margin-top: 0;

        &.too-long {
          color: @textDarkOrange;
        }
      }

      .disabled-reason {
        display: none;
      }

      .invalid {
        .disabled-reason {
          color: @textDarkOrange;
          display: block;
        }
      }
    }
  }

  #doc-contributors {
    color: @textLightGrey;
    font-size: 13px;
  }

  .last_update {
    color: #888;
  }
}

#doc-content {
  h1, h2 {
    font-weight: normal;
  }

  h1 {
    font-size: 18px;
  }

  h2 {
    font-size: 16px;
  }

  img,
  video {
    max-width: 100%;
  }

  ul,
  ol,
  dl {
    margin: 0 0 1em 1.5em;
    padding: 0;

    li {
      margin: 6px 0;
      padding: 0;

      p {
        margin: 0;
      }

      ol,
      ul,
      dl {
        margin: 0 0 0 6px;
      }
    }
  }

  .note,
  #toc {
    background: #eef2f5;
    border: 1px solid #e4ebee;
    margin: 20px 0;
    padding: 10px 12px;

    h2 {
      font-size: 16px;
      font-weight: normal;
      margin: 0;

      &:first-child {
        margin-top: 0;
      }
    }

    ul {
      list-style: none;
      margin: 0;
      padding: 0;

      > li {
        ul {
          padding-left: 16px;
        }
      }
    }

    .tocnumber {
      display: none;
    }
  }

  .warning,
  .warning-box {
    background: url('../../img/warning-stripes.png') top left repeat-x #ffe;
    border: 1px solid #fffbe7;
    margin: 20px 0 20px 0;
    padding: 20px 30px 20px 30px;
  }
}

.no-js {
  .document {
    .vote-bar {
      #unhelpful-survey {
        ul {
          > li {
            label {
              input {
                display: inline;
              }
            }
          }
        }
      }
    }
  }
}
